{extend name='common/_container'}
{block name="content"}
<div class="ibox float-e-margins">
    <input type="hidden" name='id' id='id' value="{$info.id}"/>
    <div class="ibox-content">
        <div class="form-horizontal" id="CodeInfoForm">
            <div class="row">
                <div class="col-sm-12">
                    <!-- form start -->
                  <!--  <div class="form-group">
                        <label class="col-sm-2 control-label">文字：</label>
                        <div class="col-sm-9">
                            <textarea id="content" name="content" class="form-control" placeholder="请输入内容">{$info.content}</textarea>
                        </div>
                    </div>-->

                    <div class="form-group">
                        <label class="col-sm-2 control-label">图片：</label>
                        <div class="col-sm-6">
                            <input type="text" autocomplete="off" id="image" value="{$info.image}" {if condition="config('my.img_show_status') eq true"}onmousemove="showBigPic(this.value)" onmouseout="closeimg()"{/if} name="image" class="form-control" placeholder="请输入图片">
                            <span class="help-block m-b-none image_process"></span>
                        </div>
                        <div class="col-sm-2" style="position:relative; right:30px;">
                            <span id="image_upload"></span>
                        </div>
                    </div>

                    <!-- form end -->
                </div>


            </div>
            <div class="hr-line-dashed"></div>
            <div class="row btn-group-m-t">
                <div class="col-sm-9 col-sm-offset-1">
                    <button type="button" class="btn btn-primary" onclick="CodeInfoDlg.update()" id="ensure">
                        <i class="fa fa-check"></i>&nbsp;保存
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="__PUBLIC__/static/js/upload.js" charset="utf-8"></script>
<script src="__PUBLIC__/static/js/plugins/layui/layui.js" charset="utf-8"></script>
<script src='__PUBLIC__/static/js/plugins/paixu/jquery-migrate-1.1.1.js'></script>
<script src='__PUBLIC__/static/js/plugins/paixu/jquery.dragsort-0.5.1.min.js'></script>
<script>
    layui.use(['form'], function () {
    });
    uploader('image_upload','image','image',false,'','{:getUploadServerUrl()}');
    laydate.render({elem: '#createtime', type: 'datetime', trigger: 'click'});
    var CodeInfoDlg = {
        CodeInfoData: {},
        validateFields: {}
    }
    CodeInfoDlg.collectData = function () {
        this.set('id').set('wxapp_id').set('image');
    };

    CodeInfoDlg.update = function () {
        this.clearData();
        this.collectData();
        if (!this.validate()) {
            return;
        }
        var ajax = new $ax(Feng.ctxPath + "/ZhInvit/update", function (data) {
            if ('00' === data.status) {
                Feng.success(data.msg, 1000);
                CodeInfoDlg.close();
            } else {
                Feng.error(data.msg + "！", 1000);
            }
        })
        ajax.set(this.CodeInfoData);
        ajax.start();
    };


</script>
<script src="__PUBLIC__/static/js/base.js" charset="utf-8"></script>
{/block}
